﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace Zongbao
{
    [Designer(typeof(TongJi_EMS._TJ_Basic.TJ_BasicControlDesigner))]
    public partial class zongbao : TongJi_EMS._TJ_Basic.TJ_BasicControl
    {
        public zongbao()
        {
            InitializeComponent();
            this.NeedPoint = true;
            this.NeedColorChange = false;
        }

        private void zongbao_Load(object sender, EventArgs e)
        {

        }
        //public string bol = "0";//通断状态信号
        //[CategoryAttribute("Data")]

        //public string Bol
        //{
        //    get { return bol; }
        //    set { bol = value; }

        //}
        private void zongbao_Paint(object sender, PaintEventArgs e)
        {

            ////    //zb_Alarm = true;
            ////    if (bol == "0")
            //    {
            //        e.Graphics.FillRectangle(Brushes.Red, x * 0.3f, y * 0.3f, x * 1.4f, y * 0.7f);

            //    }
            //    else
            //    {
            //        e.Graphics.FillRectangle(Brushes.Green, x * 0.3f, y * 0.3f, x * 1.4f, y * 0.7f);
            //    }
            //    e.Graphics.FillRectangle(Brushes.DarkBlue, 0, 0, x * 2f, y * 0.3f);
            //    e.Graphics.FillRectangle(Brushes.DarkBlue, 0, 0, x * 0.3f, y * 2f);
            //    e.Graphics.FillRectangle(Brushes.DarkBlue, x * 1.7f, 0, x * 0.3f, y * 2f);
            //    e.Graphics.FillRectangle(Brushes.DarkBlue, 0, y, x * 2f, y);
            //    e.Graphics.FillRectangle(Brushes.White, x * 0.3f, y * 1.5f, x * 0.35f, y * 0.1f);
            //    e.Graphics.FillRectangle(Brushes.White, x * 1.3f, y * 1.5f, x * 0.35f, y * 0.1f);


        }

        private void zongbao_Resize(object sender, EventArgs e)
        {

        }

        private void zongbao_BolChanged(TongJi_EMS._Event.TJBolChangeArgs e)
        {
            if (e.State == "0")
                this.BackgroundImage = TongJi_EMS.Properties.Resources.综保_关_;
            else
                this.BackgroundImage = TongJi_EMS.Properties.Resources.综保_开_;
            this.Refresh();
        }


    }
}